package com.yfp.operation.domain.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yfp.common.core.annotation.Excel;
import com.yfp.common.core.text.BigDecimalSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 券包销售数据查询结果
 */
@Data
public class PackageSalesDataVO {

    /**
     * 券包id
     */
    @Schema(description = "券包id")
    private Long packId;

    /**
     * 券包名称
     */
    @Excel(name = "券包名称")
    @Schema(description = "券包名称")
    private String packName;

    /**
     * 投放份数
     */
    @Excel(name = "投放份数")
    @Schema(description = "投放份数")
    private Long totalCopiesDistributed;

    /**
     * 已售份数
     */
    @Excel(name = "已售份数")
    @Schema(description = "已售份数")
    private Long soldCopies;

    /**
     * 未售份数
     */
    @Excel(name = "未售份数")
    @Schema(description = "未售份数")
    private Long unsoldCopies;

    /**
     * 售卖率
     * 已售虚拟商品份数/券包投放数量*100%
     */
    @Excel(name = "售卖率", scale = 2, suffix = "%")
    @JsonSerialize(using = BigDecimalSerializer.class)
    @Schema(description = "售卖率")
    private BigDecimal salesRate;

    /**
     * 已售总金额（元）
     */
    @Excel(name = "已售总金额（元）")
    @JsonSerialize(using = BigDecimalSerializer.class)
    @Schema(description = "已售总金额（元）")
    private BigDecimal totalSalesAmount;
}
